const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave:false,
  devServer: {
    port: '8888',
    proxy: {
      // detail: https://cli.vuejs.org/config/#devserver-proxy
      [process.env.VUE_APP_BASE_API]: {
        target: process.env.VUE_APP_BASE_URL, // 代理服务器
        changeOrigin: true,
        pathRewrite: {
          ['^' + process.env.VUE_APP_BASE_API]: '/api'
        }
      },
      '/upload': {
        target: 'http://123.56.164.38:8080/upload',
        changeOrigin: true,
        pathRewrite: {
          ['^/upload']: ''
        }
      }
    }
  }
})
